/* 商城页面样式 */

/* 分类按钮 */
.category-btn {
    padding: 8px 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.category-btn.active {
    background: linear-gradient(135deg, #2E8B57, #87CEEB);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 139, 87, 0.3);
}

/* 产品卡片 */
.product-card {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* 3D预览标识 */
.badge-3d {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    color: #2196f3;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 热销标识 */
.hot-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    animation: pulse 2s infinite;
}

/* 新品标识 */
.new-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
}

/* 收藏按钮 */
.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.wishlist-btn:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.1);
}

.wishlist-btn.active i {
    color: #ef4444;
}

.wishlist-btn i {
    color: #9ca3af;
    transition: color 0.3s ease;
}

/* 购物车角标 */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 1s infinite;
}

/* 评分星星 */
.fa-star {
    color: #fbbf24;
}

/* 价格样式 */
.text-red-500 {
    color: #ef4444;
    font-weight: 600;
}

/* 搜索栏样式 */
input[type="text"]:focus {
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

/* 滚动条美化 */
.flex.space-x-3.overflow-x-auto {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.flex.space-x-3.overflow-x-auto::-webkit-scrollbar {
    display: none;
}

/* 动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* 响应式调整 */
@media (max-height: 800px) {
    .product-card .product-image img {
        height: 120px;
    }
    
    .category-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* 加载动画 */
.product-card {
    animation: fadeInUp 0.6s ease-out;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}